package de.gwtprime.client.event;

import java.util.List;

import com.google.gwt.event.shared.GwtEvent;

import de.gwtprime.client.event.handler.VotesSectionCompleteLoadedEventHandler;
import de.gwtprime.shared.requestFactory.VoteSectionCompletedProxy;

public class VotesSectionCompleteLoadedEvent extends GwtEvent<VotesSectionCompleteLoadedEventHandler>{

public static Type<VotesSectionCompleteLoadedEventHandler> TYPE = new Type<VotesSectionCompleteLoadedEventHandler>();
	
	private List<VoteSectionCompletedProxy> votes;
	public VotesSectionCompleteLoadedEvent(List<VoteSectionCompletedProxy> votes){
		this.setVotes(votes);
	}
	
	@Override
	public Type<VotesSectionCompleteLoadedEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(VotesSectionCompleteLoadedEventHandler handler) {
		handler.onVotesLoaded(this);
	}

	public List<VoteSectionCompletedProxy> getVotes() {
		return votes;
	}

	public void setVotes(List<VoteSectionCompletedProxy> votes) {
		this.votes = votes;
	}


}
